export const dateToMysqlDateTime = (date) => {
	// 将Date对象转换为字符串
	const dateString = date.toISOString();
	// 将ISO字符串转换为MySQL datetime格式
	return dateString.substring(0, 19).replace('T', ' ');
};

export const date = (dateGMT) => {
	const date = new Date(dateGMT);
	const options = { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit' };
	const intlFormatter = new Intl.DateTimeFormat('zh-CN', options);
	return intlFormatter.format(date);
};
